home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 154 / 154.d81 / knights quad (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  193 lines

  1. 10 dv=peek(186):ifdv<8thendv=8
  2. 50 poke53280,0:poke53281,10:poke646,2:poke53272,31
  3. 60 :
  4. 70 rem  title screen
  5. 80 :
  6. 90 print"[147][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][187]";
  7. 100 print"[161][146]                                      [161]";
  8. 110 print"[161][146][144]     [172][187][172][187][172][187][172][187][172][187][172][162][162][187][172][187][172][187][172][162][162][187][172][162][162][187][172][187][160]    [161]";
  9. 120 print"[161][146][144]     [161][146][161][161][146][161][161][188][161][146][161][161][146][161][161][146][161][188][190][161][146][161][161][146][161] [161][146][161] [161][146][161][188][190] [161]     [161]";
  10. 130 print"[161][146][144]     [161][188][190][146][190][161]  [146][161][161][146][161][161][146][161][162][187][161][188][190][146][161] [161][146][161] [161][188][146][162][187]       [161]";
  11. 140 print"[161][146][144]     [161][146][161][161][146][161][161][172] [146][161][161][146][161][161][146][161][161][146][161][161][146][161][161][146][161] [161][146][161]   [161][146][161]       [161]";
  12. 150 print"[161][146][144]     [161][146][161][161][146][161][161][146][161][161][146][161][161][146][161][161][188][190][146][161][161][146][161][161][146][161] [161][146][161] [161][188][190][146][161]       [161]";
  13. 160 print"[161][146][144]  [172][162][162][187][172][187][172][187][172][162][162][187][172][162][162] [172][162][162][187][172][187][172][187]  [172][187]  [172][162][162][187]  [161]";
  14. 170 print"[161][146][144]  ";:fori=1to12:print"[161][146][161]";:next:print"  [161][146][161]  [161][146][161][188][190]  [161]";
  15. 180 print"[161][146][144]  [161][146][161][161][146][161][161][146][161][161][146][161][161][188][190][146][161][161][146][161][161][146][161][161][188][190][146][190][161][146][161][161][146][161]  [161][146][161]  [161][188][146][162]  [160][161]";
  16. 190 print"[161][146][144]  ";:fori=1to12:print"[161][146][161]";:next:print"  [161][146][161]  [161][146][161][160]   [161]";
  17. 200 print"[161][146][144]  [161][188][190][188][146][161][188][190][146][161][161][146][161][161][146][161][161][188][190][146][190][161][146][161][161][146][161][161][146][161][161][188][190][146][161][161][188][190][146][161][161][188][190][146][161]  [161]";
  18. 210 print"[161][146][144]                                      [161]";
  19. 220 print"[161][146][144]         [176][178][178][174][144][176][174][176][174][176][178][178][174][144][176][178][178][174][176][178][178][174]         [161]";
  20. 230 print"[161][146]         [221][221][173][189][144][221][221][221][221][221][221][173][189][144][221][221][173][189][221][221][173][189]         [161]";
  21. 240 print"[161][146]         [221][221]  [144][221][171][179][221][221][171][192] [144][173][177][178][174][173][177][178][174]         [161]";
  22. 250 print"[161][146]         [221][221][176][174][144][221][221][221][221][221][221][176][174][144][176][174][221][221][176][174][221][221]         [161]";
  23. 260 print"[161][146]         [173][177][177][189][144][173][189][173][189][173][177][177][189][144][173][177][177][189][173][177][177][189]         [161]";
  24. 270 print"[161][146][144]       [176][178][178][174][176][174][176][174][144][176][178][178][174][176][178][178][174][144][176][174]  [176][178][178][174][144]       [161]";
  25. 280 print"[161][146][144]       [221][221][221][221][221][221][221][221][144][173][189][221][221][173][189][221][221][144][221][221]  [221][221][173][189][144]       [161]";
  26. 290 print"[161][146][144]       [221][171][177][189][221][221][221][221][144][176][178][177][189][176][178][177][189][144][221][221]  [221][171][192] [144]       [161]";
  27. 300 print"[161][146][144]       [221][221]  [221][221][221][221][144][221][221][176][174][221][221][176][174][144][221][221][176][174][221][221][176][174][144]       [161]";
  28. 310 print"[161][146][144]       [173][189]  [173][177][177][189][144][173][177][177][189][173][177][177][189][144][173][177][177][189][173][177][177][189][144]       [161]";
  29. 320 print"[161][146]                                      [161]";
  30. 330 print"[188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146]";:poke2023,126
  31. 340 tq=0:poke53370,0
  32. 342 tq=tq+1:geta$:ifa$=""andtq<100then342
  33. 344 poke53371,0
  34. 350 poke53280,0:poke53281,10:gosub1400
  35. 352 dv=peek(186):ifdv<8thendv=8
  36. 360 :
  37. 370 rem  instruction screen
  38. 380 :
  39. 390 print"[147][144] [212]o begin, two white knights occupy the
  40. 400 [153]" upper corners  while two black knights
  41. 410 print" occupy the lower corners  of a four by
  42. 420 [153]" three chessboard grid.
  43. 430 print" [176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174] [212]he goal is to finish
  44. 440 [153]" (NULL)    (NULL)    (NULL)    (NULL) the game with the two
  45. 450 print" [221]    [221]    [221]    [221] black knights  in the
  46. 460 [153]" (NULL)    (NULL)    (NULL)    (NULL) upper corners and the
  47. 470 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] two white knights  in
  48. 480 [153]" (NULL)    (NULL)    (NULL)    (NULL) the lower corners.
  49. 490 print" [221]    [221]    [221]    [221]
  50. 500 [153]" (NULL)    (NULL)    (NULL)    (NULL) (NULL)he four knights move
  51. 510 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] as in the normal game
  52. 520 [153]" (NULL)    (NULL)    (NULL)    (NULL) of chess.  (NULL)ocated in
  53. 530 print" [221]    [221]    [221]    [221] the center portion of
  54. 540 [153]" (NULL)    (NULL)    (NULL)    (NULL) the gameboard are two
  55. 550 print" [171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179] kings who do not move
  56. 560 [153]" (NULL)    (NULL)    (NULL)    (NULL) at all.
  57. 570 print" [221]    [221]    [221]    [221]
  58. 580 [153]" (NULL)    (NULL)    (NULL)    (NULL) (NULL)elect (1) to try the
  59. 590 print" [173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189] puzzle unassisted and
  60. 600 [153]" (2) for the computer demonstration. ";
  61. 610 [151]s[170]2,44:[151]s[170]3,108:[151]s[170]4,124:[151]s[170]5,108:[151]s[170]6,44:[151]s[170]7,204
  62. 620 [151]s[170]8,124:[151]s[170]9,204:[151]s[170]10,84:[151]s[170]11,140:[151]s[170]12,84:[151]s[170]13,172
  63. 630 [151]s[170]29,0:[151]s[170]23,0:[151]s[170]21,126
  64. 632 [151]204,0:[151]207,0
  65. 634 [161]a$:[139]a$[179]"1"[176]a$[177]"2"[167]632
  66. 636 cm[178]0:[139]a$[178]"2"[167]cm[178]1
  67. 638 [151]s[170]21,0:[151]204,1
  68. 640 :
  69. 650 [143]  set variables
  70. 660 :
  71. 670 [134] f(20),t(20):m[178]1:mp[178]1089:s$[178]"                   "
  72. 680 [129]i[178]1[164]20:[135]n$:f$[178][200](n$,1):f(i)[178][198](f$)[171]64
  73. 690 t$[178][201](n$,1):t(i)[178][198](t$)[171]64:[130]
  74. 700 [129]i[178]1[164]10:s(i)[178]0:[130]:s(1)[178]1:s(3)[178]2:s(8)[178]3:s(6)[178]4
  75. 710 [129]i[178]1[164]10:[135]x(i),y(i):[130]
  76. 720 :
  77. 730 [143]  gameboard screen
  78. 740 :
  79. 750 [153]"load";:[151]53281,0:[151]53280,10:[151]646,10
  80. 760 [153]"cont  (NULL)ress (NULL) to (NULL)uit   def  wait asc(NULL)(NULL)(NULL) (NULL)(NULL)  asc(NULL)(NULL)(NULL) (NULL)(NULL)"
  81. 770 [153]"  defortantantantan=tantantantan=tantantantan^    "
  82. 772 [129]i[178]1[164]3
  83. 774 [129]j[178]1[164]3:[153]"  def(NULL)    defwait(NULL)    defwait(NULL)    defwait(NULL)    ":[130]
  84. 790 [153]"  def-tantantantan(NULL)tantantantan(NULL)tantantantan<    ":[130]
  85. 840 [129]j[178]1[164]3:[153]"  def(NULL)    defwait(NULL)    defwait(NULL)    defwait(NULL)    ":[130]
  86. 850 [153]"def  /tantantantan>tantantantan>tantantantanexp    "
  87. 860 [153]"                      wait"
  88. 870 [129]i[178]1[164]5:[153]"                      wait":[130]
  89. 872 [151]214,1:[153]:[153][163]3)"atnpeeklen
  90. 874 printtab(3)"[202][196]
  91. 876 [153][163]3)"right$val
  92. 878 printtab(3)"[200][199][198]
  93. 880 p[178]1787:[141]1580:[153]"cont(NULL)ove (NULL)umber:"
  94. 890 p[178]1984:[141]1580:[153]"def  chr$oal: peek(NULL)atnlen(NULL) on (NULL)(NU